package com.ruitu.router_module.util;

import android.text.TextUtils;
import android.widget.TextView;

import com.ruitu.arad.util.ViewUtils;

public class ViewUtil extends ViewUtils {

    public static boolean isTvEmpty(TextView tv) {
        if (null == tv) {
            throw new NullPointerException("TextView 不能为空!");
        }
        return TextUtils.isEmpty(getTxt(tv));
    }

    public static String getTxt(TextView tv) {
        if (null == tv) {
            throw new NullPointerException("TextView 不能为空!");
        }
        return tv.getText().toString().trim();
    }
}
